import React, { PureComponent } from 'react';
import { Card, message, Button } from 'antd';

class PptView extends PureComponent<any, any> {
  constructor(props: any) {
    super(props);
    this.state = {
      currentFile: {},
    };
  }

  componentDidMount () {
    const { onRef } = this.props;
    onRef && onRef(this);
  }

  initView = (file: any) => {
    console.log(123);


    this.setState({
      currentFile: file
    })
  }

  render() {
    const { currentFile: {fileUrl} } = this.state
    return (
      <div id="pptx-render" style={{ width: '100%', height: '100%', inset: '32px 0 0', }}>
        {/* <iframe src={`https://view.officeapps.live.com/op/view.aspx?src=${fileUrl}`} width='100%' height='100%' frameborder='1'></iframe> */}
      </div>
    )
  }
}
export default PptView;
